fix: power applet tips need not display when dconfig item was closed#355
Conversation
as title Log: as title Pms: BUG-301387
deepin pr auto review我来对这段代码进行审查: 语法逻辑这段代码修改了一个条件判断语句,将原来的条件判断改写为更简洁的形式。原代码中使用了两个并列的条件,使用括号和逻辑运算符组合,新代码则通过调整条件的顺序,使逻辑更加清晰。 代码质量
代码性能
代码安全
总体而言,这次代码改写是合理的,提高了代码的可读性和可维护性。建议采纳上述改进建议,以进一步提升代码质量。 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR simplifies and refines the conditional in PowerPlugin::refreshTipsData to ensure battery tips are only shown when the ‘showTimeToFull’ option is enabled and the battery is either charging or discharging, fixing the bug where tips still appeared when the config item was disabled. Class diagram for updated PowerPlugin::refreshTipsData logicclassDiagram
class PowerPlugin {
- m_systemPowerInter : SystemPowerInter*
- m_batteryStateChangedTimer : QTimer*
- m_showTimeToFull : bool
- m_tipsLabel : QLabel*
+ refreshTipsData()
}
class SystemPowerInter {
+ batteryStatus() : int
}
PowerPlugin --> SystemPowerInter : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy, yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
1 similar comment
|
/forcemerge |
|
This pr force merged! (status: blocked) |
as title
Log: as title
Pms: BUG-301387
Summary by Sourcery
Bug Fixes: